<%--
  Created by IntelliJ IDEA.
  User: deer
  Date: 2021/4/28
  Time: 13:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*,no.ComplexNumber" pageEncoding="utf-8" %>
<html>
<head>
    <title>利用JavaBean+JSP做两复数的四则运算</title>
</head>
<body>
    <jsp:useBean id="c" class="no.ComplexNumber" scope="request"/>
    <jsp:setProperty name="c" property="*"/>
    (<jsp:getProperty name="c" property="realPart1"/>+<jsp:getProperty name="c" property="imagePart1"/> i)&nbsp;
    <jsp:getProperty name="c" property="operation"/>&nbsp;(<jsp:getProperty name="c" property="realPart2"/>+<jsp:getProperty name="c" property="imagePart2"/> i) =
    <%c.Calc();%>
    <jsp:getProperty name="c" property="realans"/>+<jsp:getProperty name="c" property="imageans"/> i;
</body>
</html>
